home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_1
/
coa_12r.zip
/
COA_ADEV.DOC
next >
Wrap
Text File
|
1988-02-04
|
19KB
|
425 lines
Catacombs of Ascii v 1.2+
Advanced Event Features
-----------------------
+ = Event Stack (OR)
& = Event Daisey-Chain (AND)
* = Event and Chain simul. (AND/OR)
This document contains information on using the advanced COA event
features Event Stacking and Event Daisey-Chaining. If you are new to
COA, and/or have not used events very much in your designs, it is the
author's recomendation that you stay away from these features until you
have given yourself a chance to become familiar with the events.
Stacking and Chaining greatly enhance the possibilities of event
creation, but they also add a level of complexity -- and errors can
become very difficult to find/correct.
With that warning in place, I will do my best to describe Stacking and
Chaining in the following pages. These features are new to version 1.2,
so do not be surpised if some anonmalies emerge during actual use.
EVENT STACKING
--------------
Event stacking is a way to create an event that can be triggered multiple
ways with multiple effects. One could have an Idol, for instance, that
kills when attacked but bestows healing if spoken to.
This is accomplished by creating a series of events, one after the other,
which are all linked to the first. You indicate to the parser that the
current event is `continued on next event' by placing a plus sign (+) in
the rightmost position of the Trigger Parameter field.
In other words, a `+' in the Trigger Parameter field means `If this event
does not trigger under the current circumstances, try the next one instead.'
The Idol example:
# Desc Message Trig Trig Param Effect Tran
114 IDOL It attacks you! A + CPS001000 114
115 IDOL It heals you! T CPS002000 114
The + sign in 114's Trig Param field must be placed in the extreme
rightmost position of the field.
Note that both events Transform into 114. This is important. The
parser looks at the records this way:
If player attacks:
He's attacking #114
Does 114 respond to A trigger?
Yes, do effect and transform to 114
If player talks:
He's talking to #114
Does 114 respond to T trigger?
No. It a + present?
Yes, try next record.
He's talking to #114, using 115's data
Does 115 respond to T trigger?
Yes, do effect and transform to 114.
If a player does something else (say, Fire at):
He's Firing at #114
Does 114 respond to F trigger?
No. It a + present?
Yes, try next record.
He's Firing at #114, using 115's data.
Does 115 respond to F.
No. Is a + present?
No. No effect, no transform, nothing.
You can see that if 115's Tranform field pointed to 115, then once a
player spoke the idol it would be transformed forever into 115, which
does not respond to Attack at all. There may be situations under which
this is desireable, but normally it is not.
Also, stacked events must obviously follow in numerical order in the event
database. They are linked by the + sign only, which tells the parser to
`go on' until and unless it finds a record that can be triggered by the
player's action, or runs out of +'s.
You can stack events as deeply as you like. Really. In general, follow
these rules:
All events in the stack should have the + flag, except the last
one, which must not (for obvious reasons).
All Transform Fields usually point to the first record in the
stack.
Only the first record is actually placed in the maze.
The first requirement is natural - event stacks continue until a + is not
found, so naturally the last event in a sequence should not have a +.
The second two requirements are `normal' conventions. If you have
transforms that do other things, many special effects are possible, as
are many problems. Also, you can place mid-stack events directly in
the maze to create event stacks that are subsets of other stacks, but
again, this can cause problems if you are not careful.
Here's another example of an event stack:
# Desc Message Trig Trig Param Effect Tran
104 WAND It has runes on it G POSSESS + NIL 104
105 WAND A staircase! X + MKT005+00+00+00 104
106 WAND The Runes read: M DPFWAND.TXT 104
Note that the + can coexist with other trigger parameters as in POSSESS
above, as well as others.
This is a gettable, dual-use wand. X will cause a staircase to be
formed where the player stands, while M will display the file WAND.TXT
to him. Note again that all three records transform into 104, to keep
the wand in the same state regardless of how it is used. The wand may
even be a triple- use wand if some other event requires the player to
have #104 in his possession.
Another advantage here is that the wand stays a Gettable object even
though it has other uses. Hence, it can be Put by the player, and will
also randomize when he dies.
One issue that arises concerning possessed event items is, when are they
Putable? Generally, an item may be put if:
1) It has G as it's event trigger.
2) It has P as it's event trigger.
3) The above conditions are not met, yet one of the events stacked below
this event has P as it's trigger, and the events are linked (using +).
If none of these three conditions is met, the item cannot be put down by
the player.
Only an event with G as it's trigger will be randomized when a player
dies. A P trigger in the current or linked events does will not
suffice. This is to prevent un-gettable objects from cluttering up your
maze...
DAISEY CHAINING
---------------
While Event Stacking allows one event object to have several different
effects caused by different triggers, Daisey Chaining allows one event
to have multiple effects from a single trigger.
The setup is simple: Place a `&' in the rightmost position of the Trigger
Parameter field. Now, when the event triggers, if the event transformed
to has the same trigger as the original event, the second event will
trigger without delay. This second event may transform into a third,
which may also be instantly triggered if it has the same trigger, etc...
In other words, a `&' in the trigger parameter means `If this event
does trigger, and we are transforming to an event that triggers under
the same circumstances, then trigger the next event immediately.'
Here is an example:
# Desc Message Trig Trig Param Effect Tran
104 HOLE You fall in! O & MVP+01+00+00 105
105 HOLE You take damage! O & CPS002+01 106
106 HOLE You lost something! O CPS005000 104
When the player steps on HOLE (104), three things will happen - first he
will be moved one level down, then will take a point of damage, then his
gold will reduced to 0. Note that the last object in the list tranforms
back to the first: but the absense of the & prevents it from triggering
104 again and creating an infinite loop. The system will try and prevent
such loops anyway, by remembering what the first event in the chain was
and so forth, but the final responsbility it up to you. Don't loop events
back onto themselves!
Note that Daisey chaining, unlike event stacking, need not be done with
congtiguous events. The chained events are linked by the Transform
Field, so they may be placed anywhere in the event db. Naturally, it is
to your advantage to place them together, since this makes debugging
much easier.
STACKS AND CHAINS: COMPARE/CONTRAST AND COMBINE
-----------------------------------------------
One way to more fully understand event stacking and daisey chaining is to
compare them:
> Stacks must be in contiguous records.
> Chains can leap back and forth across any records.
> Upon triggering, a stack will be searched *until* a record is found
that will trigger, then *that* record triggers/transforms and the
stack is terminated.
> Upon triggering, a chain will trigger *every record* in the chain,
transforming each to the next, *until* a record is found that cannot
be triggered, or until the top of the chain is re-joined, or until
a `*' is not found in the trigger parameter field.
> Both stacks and chains respond to a single trigger. The player is
never asked more than once for Talk or CDx information.
Another way of looking at it:
`+' matters if the record is NOT triggered. It means `try next one'.
`&' matters if the record IS triggered. It means `try the one I am
transforming to also'.
And, as you are about to see, `*' means do BOTH of these things.
Consider the following examples:
The Book
--------
# Desc Message Trig Trig Param Effect Tran
101 BOOK It is old and worn G POSSESS + NIL 101
102 BOOK It reads thus: M + DPFBOOK.TXT 101
103 BOOK A Dagger is created! T DAGGER + MKO001CD1 101
104 BOOK A S-Swd is created! T SHORT + MKO002CD1 101
105 BOOK A L-Swd is created! T LONG + MKO003CD1 101
106 BOOK A Space is cleared T DESTROY * MKT001CD1 135
107 BOOK A Wall is created! T WALL MKT000CD1 101
.
.
.
135 BOOK All things living & T DESTROY & DSOCD1 136
136 BOOK dead are removed T DESTROY DSMCD1 101
#101 is placed in the maze, or directly into the possession of a player
using COA_EDIT.
Here is a maze-designer tool for designers that maintain their mazes from
a remote location, as a player. It allows one to create weapons and walls,
and to clear spaces of terrain, objects, and monsters.
Once the book is Gotten, only 102 can be triggered as you cannot Talk to
something in your possession. Therefore, BOOK.TXT, which is displayed if
the player M's the book, should explain that the book should be placed on
the floor and spoken to, with perhaps a list of the words to speak and what
they will do.
Note closely event 106. In order to clear a space, three things must happen;
the terrain must be made 001 (clear), any object there should be destroyed,
and any monster there should be likewise destroyed. This requires a three-
event chain *if* 106 is the event in the stack that gets triggered, so 106
transforms to 135, which in turn transforms into 136, which transforms back
into 101. Note that since 101 is the object as possessed by the player, it
is the record to transform back into (not 106, which was the head of the
daisey chain).
A question that may be on your mind is: How does 106 chain to 135 if
106 does not have `&' in the trigger parameter field? The system requires
that you use an `*' where both a `+' and a `&' are needed. In other words,
`*' means `both + and &'.
Note that although all three events in the chain (106, 135, 136) have
CD1 in their effect, which causes the system to ask the player for a
direction, the player will only be asked once, upon the first
occurance, and the direction chosen will be applied to all three
events. Similarly with the Talk triggers throughout the stack and the
chain, the player will only be asked if 101 and 102 fail to trigger,
and then only one time, with his response applied to all talk events
throughout the event stack and chain.
(My thanks to Rick Bickmore for the remote designer tool idea - my
example here could easily be expanded to include staircases, secret
doors, chests, etc... simply by adding items to the stack.)
A Tree
------
# Desc Message Trig Trig Param Effect Tran
121 TREE Dumb Idea... A + NIL 121
122 TREE Paint Your Wagon? T + NIL 121
123 TREE You climb the tree! O & NIL 124
124 TREE An Apple fell! O & MKO135+00+01+00 125
125 TREE So did you! Ow! O CPS002+01 121
.
.
.
135 APPLE It is nice and ripe G POSSESS + NIL 135
136 APPLE You feel better C CPS002-01 000
121 is placed in the maze. If a player attacks the tree, not much happens
except the message `Dumb Idea...' is displayed. If he talks to it, he
gets a stupid joke (anybody get this one?). If he moves into the same
space as the tree, he activates a three-event chain. Note that here, un-
like the book, the chain is contiguous with the stack. Just wanted to show
you that it could be done either way.
When 123 is triggered, two things happen - an object (#135) is created next
to the tree, and the player takes a point of damage from falling.
Note that 135 is not part of the original stack or chain. It is simply a
seperate event that gets created by this one. If the player then picks
up the apple and eats it, his wound is healed and the apple vanishes (he
ate it, after all). Cute, huh?
Also note that though 123 is part of the stack, it is the *last* record
in the stack and would not normally have a `+'. Therefore, since it is
the beginning of a chain as well, the `&' is used. In other words,
though it is part of both a stack and a chain, as in the case of record
106 of The Book, it does not require both `+' and `&' since it is the
last record of the stack, so `*' is not used. Confusing? You bet. But
this only happens when the end of a stack is also the beginning of a
chain.
Just remember this: All records of a stack have a `+' except the last
one. All records of a chain have `&', except the last one. In any
case where you need both, use `*'.
The Ore-Cart(s)
---------------
# Desc Message Trig Trig Param Effect Tran
214 CART Funny, no answer T + NIL 214
215 CART Ah- A chest beneath A + NIL 059
216 CART HANG ON! O & MVP+00+10+00 217
217 CART O MKO218+00+00+00 000
218 CART It's a good listener T + NIL 218
219 CART Ah- A chest beneath A + NIL 059
220 CART HANG ON! O & MVP+00-10+00 221
221 CART O MKO214+00-00+00 000
Ah - special effects! Here I break many of the rules I state earlier to
show how tricky but creative effects can be acheived by fiddling with
the tran parameter...
214 is placed in the maze. If the player tries to Talk to it, not much
happens. If he attacks it, it transforms into a chest (059, pretty
nice), and the CART event is gone *forever*. If he gets on/in the
CART, two things happen in the chain that ensues; the player is moved
10 spaces to the right, and another CART (#218) is created `under' him.
Note that the chain ends with a transform to 000, destroying this CART
(it has `moved', after all).
Also, it is important to understand why event 217 uses +00+00+00 as
it's location to make the new object, rather than +00+10+00. Relative
location indexes are relative to the `current` location. In normal
event triggering, this is the location of the event; but in a stack or
chain, each event is triggered after the previous one is complete, so
the MVP had already changed the `current' location before the MKO was
activated. MVP is the only sort of event that would cause this. Had
I placed the MKO *before* the MVP, then I would have used the +00+10+00
string.
218 is identical, save that it moves the player 10 spaces to the left.
Here you can see that one-way stacks and chains do serve a purpose, if
you are careful and test your events thoroughly. Yeah, I know. It's
complex. Well, you can't say I didn't warn you!
Remember these five cardinal rules:
1) A triggered record always transforms, at least.
2) A non-triggered record never transforms.
3) A plus (+) in the Trigger Parameter means:
`If I do NOT trigger, try the next record in my place.'
4) An ampersand (&) in the Trigger Parameter means:
`If I DO trigger, and if the event I am transforming to
triggers under the SAME circumstances, trigger it now.'
5) Anytime you need both a plus and an ampersand, use the
asterisk (*).
A subtler Example:
-----------------
# Desc Message Trig Trig Param Effect Tran
101 PHOTO You lose a STR pt. T DORIAN * CPS001+01 102
102 PHOTO You are healed by 1 T & CPS002-01 103
103 PHOTO and lose 5 turns T CPS000-05 101
If a player speaks to the photo, but says something other than DORIAN:
1 - 101 does not trigger, but * works like a + so check next.
2 - 102 does trigger, so heal 1 point. Transform to 103,
and since & is present try to trigger 103 immediately.
3 - 103 does trigger, so lose 5 turns. Transform to 101,
but since no & do not try to trigger 101.
Remember that Talk with no trigger param means `trigger on any Talk'.
If a player speaks to the photo, and does say DORIAN:
1 - 101 does trigger, so reduce STR by 1. Transform to 102,
and since * also works like a &, attempt to trigger it.
2 - 102 does trigger - Talk any, right? So heal a point,
and transform to 103. Since & is present, attempt
to trigger it.
3 - 103 does trigger, so reduce turns by five. No & is
present, so transform to 101 but do not attempt trigger.
If the player does anything else:
1 - 101 does not trigger, but * indicates a + so check next.
2 - 102 does not trigger, and & does not matter if the record
is un-triggered. No +, so stop here and quit, no trans-
form, no effect, nothing done.
-Scott Bain-
The Scanline Remote
(619)298-2023
300/1200/2400